This page will document applications of the Lambert W function that are too short to comprise individual presentations on this website.

Contents

Definition of the Function
Calculus of the Function
Solution of the Equation yx = xy
Solutions of Other Equations
Iterated Exponentiation


Definition of the Function

This function is defined implicitly as the inverse of the nonlinear transcendental equation

W(z) eW(z) =z

Since the function inverts this relation, one can immediately write

W1 (z) =zez

The Lambert function has an infinite number of complex branches, like the complex natural logarithm that approximates it. The principal branch is designated W0 .

Slightly rearranging the defining equation,

z=eW +lnW =eW+lnW +2nπi

it is clear that the following relation holds between different branches of the Lambert function:

Wn+lnWn =W0+lnW0 +2nπi

This is analogous to how branches of the complex logarithm are related to one another.

An approximation to the function useful for numerical root finding is

W(z) lnz-lnlnz

This approximation becomes exact asymptotically, which can be seen by putting it into the defining equation and letting the independent variable grow,

(lnz -lnlnz) zlnz z 1-lnlnz lnz 1 limz (1-lnlnz lnz) =limz (1-1 zlnz ×z) =1

where the last step follows from applying l’Hôpital’s rule to the fraction.

Both the function and its inverse are supported in Math as fully complex functions.


Calculus of the Function

The derivative of the function is found by differentiating the defining equation implicitly:

WeW +WW eW =1 W=1 eW(1 +W) =1eW +z

The integral of the function is surprisingly easy to evaluate because integration by parts of a polynomial against an exponential is trivial:

W(z) dz = Wd (WeW) =e W(W +W2) dW W(z) dz =eW (W-1) +eW (W2-2W +2) =eW (W2 -W+1) W(z) dz =zW-z +eW =z(W-1 +1W)

A power series about the origin can be found using Lagrange inversion. From the defining equation, the function is necessarily zero at the origin because the exponential function is nonzero positive for finite real argument. The inversion statement simplifies considerably:

W(z) =k=1 zkk! lim w0 dk-1 dw k-1 (w wew )k W(z) =k=1 zkk! lim w0 dk-1 dw k-1 ekw W(z) =n=1 (k) k-1 k! zk

This approach is much simpler that explicit evaluation of derivatives for a Taylor series.

The radius of convergence of this series can be found using the ratio test, which takes the absolute value of the ratio of adjacent coefficients:

L=lim k (k+1 )k (k+1)! k! kk-1 =lim k kk+1 (1+1k )k=e R=1e 0.367879

Since the radius of convergence is so small, numerical evaluation of the function via the power series is not practical. A better approach is Newton’s method, which is used in Math.


Solution of the Equation yx = xy

This equation clearly has a trivial solution y=x . It also has a solution in terms of powers of two:

24 =22·22 =42

There is additionally a solution that is not obvious. First take a logarithm of both sides of the equation,

lnyy =lnxx

then note the following inverse function value:

W1 (lny) =lnyy

This means one can write

y=exp[W( lnxx )]

without much algebraic manipulation. The two continuous solutions look like this:

The portion in red comes from the principal branch W0 of the Lambert function, while the portion in magenta requires the branch W1 . The two solutions meet at x=e where

y=exp[W( 1e)] =exp[ (1)] =e

on both of the branches involved.

Another way to represent the nonobvious solution is via a parametrization. Setting y=ux , the equation becomes

(ux)x =xux =(xu )x x=u1/ (u-1) y=uu/ (u-1)

It is straightforward to insert this parametrization in the previous solution to verify that it is correct.


Solutions of Other Equations

Other bases in the defining equation are handled rather easily:

xbx=a =xexlnb x=W( alnb) lnb

A doubly exponentiated variable can be solved with an intermediate exponential x=ey  :

ln[ xxa =b] xalnx =lnb yeay =lnb x=exp[ W(alnb) a]

A linear combination of a variable and its exponential can handled with an intermediate linear variable x=b-y  :

ax+x =b abe ylna =y x=b-W( ablna) lna

An additional constant factor on the linear term adds a denominator to the intermediate variable, altering the solution to

ax+cx =b ab/c e(y/c) lna =y x=bc -W( a b/c lnac) lna

The particular branch has not be specified in these solutions since any branch serves as a solution. This is because the dependent variable appears in entire functions. This is not true of the next equation.


Taking a logarithm of both sides of the following transcendental equation indicates that is is soluble by the Lambert function:

exp[ lnx+ax =b ] xeax =eb x=W( aeb) a

Numerical evaluation of this expression followed by substitution in the original equation indicates that it is not satisfied by just any branch. The necessary branch can be determined using the relation above between different branches:

lnax+ax =b+lna W0( aeb) +lnW0( aeb) +2nπi =b+lna n=b+lna -W0( aeb) -lnW0( aeb) 2πi

Then the correct solution to the original equation is

lnx+ax=b x=Wn( aeb) a

with n as indicated.


Iterated Exponentiation

Iterated exponentiation is defined by the expression

f(z) =zzzz

whenever it converges: for real numbers that occurs for ee z e1/e  . The expression can be evaluated with the Lambert function by rearranging into the latter’s defining equation:

f(z) =zf(z) =eflnz flnz eflnz =lnz f(z) =W( lnz) lnz

And here’s how this function looks on the specified interval, using the principal branch of the Lambert function:


Uploaded 2020.11.27 — Updated 2022.11.24 analyticphysics.com